﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using OpenSIS.OpenSISWCFServiceReference;
using AjaxControlToolkit;
using System.Globalization;
using OSISToolTip;

namespace OpenSIS.Tools
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {



                PopulateGridview();

                //PopulateNextGrade(ref ddlNextGradeAdd);

            }
            
        }

        protected void PopulateGridview()
        {
            DataTable dt = new DataTable();


            OpenSISWCFServiceToolsClient Tools = new OpenSISWCFServiceToolsClient();

            dt = Tools.PopulateEthnicityDetails("", "");

            Tools.Close();

            string Culture = System.Web.HttpContext.Current.Session["MLCulture"].ToString();

            if (dt.Rows.Count > 0)
            {

                rlEthnicity.DataSource = dt;
                rlEthnicity.DataBind();

                //*******************************6th August//
                //lblmsg.Text = GVEthnicity.Items.Count.ToString() + " " + "Grade Level were found";


                switch (Culture)
                {
                    //case "en-US":
                    //    lblmsg.Text = rlEthnicity.Items.Count.ToString() + " " + "Ethnicity were found";
                    //    break;
                    //case "es-MX":
                    //    lblmsg.Text = rlEthnicity.Items.Count.ToString() + " " + "Etnia se encontraron";
                    //    break;
                    //case "zh-CN":
                    //    lblmsg.Text = rlEthnicity.Items.Count.ToString() + " " + "族群被发现";
                    //    break;
                    //case "ja-JP":
                    //    lblmsg.Text = rlEthnicity.Items.Count.ToString() + " " + "民族が見つかりませんでした";
                    //    break;
                    //case "de-DE":
                    //    lblmsg.Text = rlEthnicity.Items.Count.ToString() + " " + "Volkstum gefunden";
                    //    break;
                    //case "ko-KR":
                    //    lblmsg.Text = rlEthnicity.Items.Count.ToString() + " " + "민족성이 발견";
                    //    break;
                    //case "fr-FR":
                    //    lblmsg.Text = rlEthnicity.Items.Count.ToString() + " " + "L'ethnicité ont été trouvés";
                    //    break;
                    //case "it-IT":
                    //    lblmsg.Text = rlEthnicity.Items.Count.ToString() + " " + "Etnia sono stati trovati";
                    //    break;
                    //case "ru-RU":
                    //    lblmsg.Text = rlEthnicity.Items.Count.ToString() + " " + "Этничность были найдены";
                    //    break;
                    //case "pt-BR":
                    //    lblmsg.Text = rlEthnicity.Items.Count.ToString() + " " + "Etnia foram encontrados";
                    //    break;
                    //case "ar-SA":
                    //    lblmsg.Text = GVEthnicity.Items.Count.ToString() + " " + "تم العثور على الرتبة";
                    //    break;
                }
                //    //*******************************6th August//


            }
            else
            {


                rlEthnicity.DataBind();

                //    //*******************************6th August//
                //    //lblmsg.Text = "No Grade Level were found";
                switch (Culture)
                {
                    //case "en-US":
                    //    lblmsg.Text = "No Ethnicity were found";
                    //    break;
                    //case "es-MX":
                    //    lblmsg.Text = "No se encontraron Etnia";
                    //    break;
                    //case "zh-CN":
                    //    lblmsg.Text = "没有种族被发现";
                    //    break;
                    //case "ja-JP":
                    //    lblmsg.Text = "いいえ民族は見つかりませんでした";
                    //    break;
                    //case "de-DE":
                    //    lblmsg.Text = "Nr. Volkstum gefunden";
                    //    break;
                    //case "ko-KR":
                    //    lblmsg.Text = "아니 인종이 발견되었습니다";
                    //    break;
                    //case "fr-FR":
                    //    lblmsg.Text = "Aucun ethnicité ont été trouvés";
                    //    break;
                    //case "it-IT":
                    //    lblmsg.Text = "Non sono stati trovati Etnia";
                    //    break;
                    //case "ru-RU":
                    //    lblmsg.Text = "Этничность не были найдены";
                    //    break;
                    //case "pt-BR":
                    //    lblmsg.Text = "Nenhum Étnico foram encontrados";
                    //    break;
                    //case "ar-SA":
                    //    lblmsg.Text = "لا الرتبة تم العثور على";
                    //    break;
                }
                //    //*******************************6th August//

            }
        }
    }
}